package com.huiyun.project.im.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author bogon
 * @since 2020-07-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("im_user")
@ApiModel(value = "ImUser对象", description = "用户表")
public class ImUser implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.INPUT)
    private String id;
    @ApiModelProperty(value = "业务系统ID")
    private String bid;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "昵称")
    private String nick;

    @ApiModelProperty(value = "客服别名")
    private String alias;


    @ApiModelProperty(value = "是否初始化密码 0.登录需要修改密码 1.正常")
    private Integer changePassword;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "密码连续错误次数")
    private Integer passwordErrorCount;

    @ApiModelProperty(value = "随机盐")
    private String salt;

    @ApiModelProperty(value = "头像")
    private String avatar;

    @ApiModelProperty(value = "账号类型 1.普通账号 2.客服账号")
    private Integer type;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    private String modifyBy;

    @ApiModelProperty(value = "修改时间(记录基础信息修改的最后时间)")
    private Date modifyTime;

    @ApiModelProperty(value = "0.正常 1.锁定")
    private Integer lockFlag;

    @ApiModelProperty(value = "0-正常，1-删除 , 2-长时间不用冻结")
    private Integer delFlag;

    @ApiModelProperty(value = "租户ID")
    private String imTenantId;

    @ApiModelProperty(value = "服务商ID")
    private String imSpId;

    @ApiModelProperty(value = "应用ID(用户>租户>应用组)")
    private String appId;

    @ApiModelProperty(value = "应用组ID(用户>租户>应用组)")
    private String appGroupId;

    @ApiModelProperty(value = "所属客服组)")
    private String userOrgId;

    @ApiModelProperty(value = "最后登陆IP(登陆完成后更新)")
    private String lastLoginIp;

    @ApiModelProperty(value = "最后登陆地址(登陆完成后更新)")
    private String lastLoginAddress;

    @ApiModelProperty(value = "会话排序方式")
    private Integer sessionSortType;


}
